29 September 2017

Maximum Entropy

Maximum Entropy

Maximum Entropy

Maximum Entropy

Maximum Entropy

Maximum Entropy

Maximum Entropy and Macroecology

The core of METE

Ecosystem structure function (ESF) \[ R(n, \varepsilon \mid S_0, N_0, E_0) = \text{joint prob of abundance and metab rate} \] Species abundance and metabolic rate distributions follow

Spatial structure function (SSF) \[ \Pi(n_i \mid N_0, n_0, A_0, A) = \text{prob of abundance in cell of size } A \] Spatial abundance distribution and species area relationship follow

meteR

meteR: Data + Core

library(meteR)
data(arth)
head(arth)
##        spp count   mass
## 1 blacchel     1 4.7480
## 2 mecyocul     1 1.6490
## 3 eurynsp1     1 0.2584
## 4 eurynsp1     1 0.2584
## 5 eurynsp1     1 0.2584
## 6 eurynsp1     1 0.2584
arthESF <- meteESF(spp = arth$spp, abund = arth$count, 
                   power = arth$mass^0.75)
arthESF # this is the print method
## METE object with state variables:
##       S0       N0       E0 
##    76.00   547.00 15868.26 
## 
## with Lagrange multipliers:
##         la1         la2 
## 0.037929267 0.004960427

meteR: Data + Core

length(unique(arth$spp))
## [1] 76
sum(arth$count)
## [1] 547
sum(arth$mass^0.75 / min(arth$mass^0.75))
## [1] 15868.26
arthESF_stateVar <- meteESF(S0 = 76, N0 = 547, E0 = 15868.26)

meteR: Data + Core

data(anbo)
head(anbo)
##   row column    spp count
## 1   3      3   cabr     3
## 2   3      3 caspi1    20
## 3   3      3   crcr     3
## 4   3      3  crsp2     1
## 5   3      3   gnwe    11
## 6   3      3  grass    11
anboSSF <- meteSSF(spp = anbo$spp, sppID = 'gnwe', 
                   abund = anbo$count, row = anbo$row, 
                   col = anbo$column, A = 1, A0 = 16)
anboSSF
## METE object with state variables:
## n0  A A0 
## 41  1 16 
## 
## with Lagrange multipliers:
## [1] 0.3294792

meteR: Prediction + Analysis

arthSAD <- sad(arthESF)
plot(arthSAD, ptype = 'rad')

logLik(arthSAD)
## 'log Lik.' -201.8189 (df=2)

meteR: Prediction + Analysis

anboSAR <- meteSAR(spp = anbo$spp, abund = anbo$count, 
                   row = anbo$row, col = anbo$col, 
                   Amin = 1, A0 = 16)
plot(anboSAR)

mse(anboSAR)
## [1] 29.79903

goodness of fit and pika, looking forward